#include <iostream>
#include <cstdlib>

using namespace std; 

int main () {
  cout << ("Content-type: application/xml") << endl << "\r" << endl;
  cout << ("<?xml version=\"1.0\" encoding=\"utf-8\"?>") << endl;

  string data = getenv("QUERY_STRING");

  int fils = atoi(&data[2]);
  int cols = atoi(&data[6]);

  if (fils > 0 && cols > 0 && fils < 10 && cols < 10) {
    cout << "<tabla>" << endl;

    for (int i = 0; i < fils; i++) {
      cout << "  <fila_" << i << ">" << endl;
      for (int j= 0; j < cols; j++) {
        cout << "    <columna_" << j << ">" << "[" << i << "," << j << "]" << "</columna_" << j << ">" << endl;
      }
      cout << "  </fila_" << i << ">" << endl;
    }
    
    cout << "</tabla>" << endl;
  } else {
    cout << "<tabla_vacia> </tabla_vacia>" << endl;
  }
  return 0;
}
